import React, { Component } from 'react'
// 引用外部文件
import { Provider } from 'react-redux'
import './utils/PayUtil'
import CustomNavigator from './route'
import store from './store'
// 调用 store 文件中的 mainReducer常量中保存的方法
// const store = configureStore()
import './utils/RequestUnit'
import './utils/IMController'
import NavigationUtil from './utils/NavigationUtil'
export default class App extends Component {
  render () {
    return (
      // 第一层包装,为了让 main 能够拿到 store
      <Provider store={store}>
        <CustomNavigator
          ref={navigatorRef => {
            NavigationUtil.setTopLevelNavigator(navigatorRef)// 设置顶层导航
          }}/>
      </Provider>
    )
  }
}
